// <copyright file="EndpointValidationProvider.cs" company="SharpSTS">
// Copyright (c) 2007, 2008 All Right Reserved, http://sharpsts.com/
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Barry Dorrans</author>
// <email>barryd@idunno.org</email>
// <date>2008-06-11</date>
// <summary>Provides the contract for an endpoint validation provider.</summary>

namespace SharpSTS
{
    using System.Collections.ObjectModel;
    using System.ServiceModel;
    using System.Configuration.Provider;

    /// <summary>
    /// Defines the contract an EndpointValidationProvider must implement to validate an endpoint.
    /// </summary>
    public abstract class EndpointValidationProvider : ProviderBase
    {
        /// <summary>
        /// Validates that an endpoint address may request the list of provided claims.
        /// </summary>
        /// <param name="endpoint">The endpoint address to validate.</param>
        /// <param name="claims">The list of claim URIs to validate.</param>
        /// <returns>True if the endpoint is valid, otherwise false.</returns>
        public abstract bool IsValid(EndpointAddress endpoint, ReadOnlyCollection<string> claims);
    }
}
